﻿<Window x:Class="ModularityWithMef.Desktop.Shell"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d"
    xmlns:local="clr-namespace:ModularityWithMef.Desktop"	
	x:Name="Window"
	Title="Modularity with MEF QuickStart - Desktop"
    WindowStartupLocation="CenterScreen"
	UseLayoutRounding="True"
	Width="640" Height="600">
    <Grid x:Name="LayoutRoot">
    	<Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
    	</Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition/>
        </Grid.ColumnDefinitions>
        <TextBlock TextWrapping="Wrap" VerticalAlignment="Top" Grid.ColumnSpan="2" FontSize="24" Text="Modularity with MEF QuickStart - Desktop" Margin="5"/>
        <Border BorderBrush="#FF99A8B6" BorderThickness="2" CornerRadius="2" HorizontalAlignment="Left" Width="230" Grid.RowSpan="2" Grid.Row="1">
            <Border.Background>
                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                    <GradientStop Color="White" Offset="0"/>
                    <GradientStop Color="#FFD2E4F5" Offset="1"/>
                </LinearGradientBrush>
            </Border.Background>
            <TextBlock TextWrapping="Wrap" Margin="5,10,5,5"><Run Text="This desktop application demonstrates the discovery and loading of independent modules using Prism with the Managed Extensibility Framework."/><LineBreak/><Run/><LineBreak/><Run Text="In this example different modules are discovered by direct reference, directory sweep, or configuration. Hover over a module on the right to see a tooltip describing how it is initialized."/><LineBreak/><Run/><LineBreak/><Run Text="The window below shows the logging trace from the Bootstrapper class."/></TextBlock>
        </Border>
        <Canvas Grid.Row="1" Grid.Column="1" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="20,20,0,0" Height="300" >
            <local:ModuleControl VerticalAlignment="Top" DataContext="{Binding ModuleATrackingState}" Height="100" Width="100" Canvas.Top="22" Style="{StaticResource ModuleControlStyle-Simple}" AutomationProperties.AutomationId="ModuleAAutomationId"/>
            <local:ModuleControl VerticalAlignment="Top" DataContext="{Binding ModuleBTrackingState}" Height="100" Width="100" Canvas.Top="22" Canvas.Left="122" RequestModuleLoad="ModuleB_RequestModuleLoad" Style="{StaticResource ModuleControlStyle-Simple}" AutomationProperties.AutomationId="ModuleBAutomationId"/>
            <local:ModuleControl VerticalAlignment="Top" DataContext="{Binding ModuleCTrackingState}" Height="100" Width="100" Canvas.Top="22" RequestModuleLoad="ModuleC_RequestModuleLoad" Canvas.Left="257" Style="{StaticResource ModuleControlStyle-Simple}" AutomationProperties.AutomationId="ModuleCAutomationId"/>
            <local:ModuleControl VerticalAlignment="Top" DataContext="{Binding ModuleDTrackingState}" Height="100" Width="100" Canvas.Top="160" Style="{StaticResource ModuleControlStyle-Simple}" AutomationProperties.AutomationId="ModuleDAutomationId"/>
            <local:ModuleControl VerticalAlignment="Top" DataContext="{Binding ModuleETrackingState}" Height="100" Width="100" Canvas.Top="160" RequestModuleLoad="ModuleE_RequestModuleLoad" Canvas.Left="122" Style="{StaticResource ModuleControlStyle-Simple}" AutomationProperties.AutomationId="ModuleEAutomationId"/>
            <local:ModuleControl VerticalAlignment="Top" DataContext="{Binding ModuleFTrackingState}" Height="100" Width="100" Canvas.Top="160" RequestModuleLoad="ModuleF_RequestModuleLoad" Canvas.Left="257" Style="{StaticResource ModuleControlStyle-Simple}" AutomationProperties.AutomationId="ModuleFAutomationId"/>
			<Path Data="M467,141 L467,197.0357" Stretch="Fill" StrokeEndLineCap="Triangle" Stroke="#FF99A8B6" StrokeThickness="20" Canvas.Top="126" UseLayoutRounding="False" StrokeStartLineCap="Square" Height="30" Canvas.Left="40" />
			<Path Data="M467,141 L467,197.0357" Stretch="Fill" StrokeEndLineCap="Triangle" Stroke="#FF99A8B6" StrokeThickness="20" Canvas.Top="194" UseLayoutRounding="False" StrokeStartLineCap="Square" Height="30" Canvas.Left="229"  RenderTransformOrigin="0.5,0.5">
				<Path.RenderTransform>
					<TransformGroup>
						<ScaleTransform/>
						<SkewTransform/>
						<RotateTransform Angle="90"/>
						<TranslateTransform/>
					</TransformGroup>
				</Path.RenderTransform>
			</Path>
        </Canvas>
        <TextBox x:Name="TraceTextBox" Grid.ColumnSpan="2" Margin="10,0,10,10" TextWrapping="Wrap" VerticalAlignment="Stretch" VerticalScrollBarVisibility="Visible" AcceptsReturn="True" Grid.Row="2" MinHeight="200"/>
    </Grid>
</Window>